{% extends 'base.html' %}

{% block table %}
<li class="nav-item">
    <a class="nav-link" href="{{ url_for('new') }}">发布文章</a>
</li>
<li class="nav-item">
    <a class="nav-link" href="{{url_for('about')}}">关于测试</a>
</li>
{% endblock %}

{% block content %}
<h2>{% block title %} {{ post['title'] }} {% endblock %}</h2>
<div style="float: left">
    <span class="bg bg-primary">{{ post['created'] }}</span>
</div>
<div>
    <form style="float: right" action="{{ url_for('delete', post_id=post['id']) }}" method="post">
        <input type="submit" value="删除" class="btn btn-danger btn-sm"
               onclick="return confirm('确定要删除吗?')">
    </form>
    <form style="float: right" action="{{ url_for('edit', post_id=post['id']) }}" method="get">
        <input type="submit" value="编辑" class="btn btn-warning btn-sm">
    </form>
</div>
<br>
<hr>


<p>
    <br>
    {{ post['content'] }}
    <br>
    <br>
</p>

<hr>

{% endblock %}